<?php
/* FILE: index_secure.php
 * DESCRIPTION: Main page the user sees after logging in. Initially shows the collection list
 * POST DATA: N/A
 * GET DATA: N/A
 */ 
 
// Inialize session
session_start();

// Check, if user_name session is NOT set then this page will jump to login page
if (!isset($_SESSION['user_name'])) {
header('Location: index.php');
}

?>
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
	<meta name="keywords" content="">
	<meta name="description" content="">
	<title>Collectionoid - Main Menu</title>
	<link rel="stylesheet" type="text/css" href="reset-fonts-grids.css">
	<link rel="stylesheet" type="text/css" href="base.css">
	<style type="text/css">
	.style1 {
		margin-right: 0;
	}
	</style>
</head>
<body>
	<div id="doc2" class="yui-t1">
	  <div id="hd" style="padding-left:10px;">
	    <a href="./index.php">
	    	<img src="images/collectionoid_banner.png" alt="Collectionoid.com" height="100" width="922">
	 	</a>
	  </div>
	  <div id="bd">
	    <div id="yui-main">
			<div class="yui-b">
					<!-- MAIN CONTENT -->
					<div style="margin: 10px;  font-family:Georgia, 'Times New Roman', Times, serif;">
						<div style="margin-left:650px;" class="style1">
							<a href="logout.php">Logout</a>
						</div>
						<p>Welcome, <b><?php echo $_SESSION['user_name']; ?></b>!
						&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="mod_user_data.php">[Your Account]</a></p>
						<input type="button" value="Create New Collection" onClick="location.href='new_collection.php'" style="width: 182px; font-size: small; font-style: normal; font-variant: normal; font-weight: bold; line-height: normal; font-family: Arial, Helvetica, sans-serif;">
						<br />
						<br />
						<iframe src="collection_list.php" name="collection_main" frameborder="0" height="50%" width="95%" scrolling="auto">
						</iframe>
					</div>
					<!-- END MAIN CONTENT -->
				</div>
			</div>
			<div class="yui-b">
				<!-- AD GOES HERE -->
				<div style="margin-top:20px; margin-left:20px; margin-bottom:20px; height:200px; border: 1px solid black;">
					<p>AD</p>
				</div>
			</div>
		</div>
		<div id="ft">
	    <div style="padding:10px 50px 10px 350px; font-family:Georgia, 'Times New Roman', Times, serif;">
	    	<a href="about.html">About</a> | 
	    	<a href="terms.html">Terms of Use</a> | 
	    	<a href="mailto:cwilkins1@gmail.com, jeff.rtitus@gmail.com">Contact the developers</a> 
	    </div>
	    <div style="padding:0 0 0 480px; font-family:Georgia, 'Times New Roman', Times, serif;">&copy; 2010</div>
	  </div>
	</div>
</body>
</html>
